﻿using System;


namespace RStudio.UIFramwork
{
    /// <summary>
    /// UI 事件参数
    /// </summary>
    public class UIEventArg : EventArgs
    {
        /// <summary>
        /// 发送者
        /// </summary>
        /// <remarks>
        /// 该字段仅用于实验阶段。可忽略
        /// </remarks>
        public object Sender { get; set; }

        /// <summary>
        /// 引用类型
        /// </summary>
        public Type Type { get; set; }

        /// <summary>
        /// 页面对象
        /// </summary>
        public UIBase UIBase { get; set; }

        /// <summary>
        /// UI 事件类型
        /// </summary>
        public UIEventType UIEventType { get; set; }

        /// <summary>
        /// 事件通知|
        /// </summary>
        public bool IgnoredNotice { get; set; }



        public UIEventArg() { }


        public UIEventArg(object Sender, Type type, UIEventType uiEventType, UIBase uiBase = null)
        {
            this.Sender = Sender;
            this.Type = type;
            this.UIEventType = uiEventType;
            this.UIBase = uiBase;

            this.IgnoredNotice = false;
        }

        public UIEventArg(Type type, UIEventType uiEventType, UIBase uiBase = null)
        {
            this.Type = type;
            this.UIEventType = uiEventType;
            this.UIBase = uiBase;

            this.IgnoredNotice = false;
        }
    }
}
